GetNewControl
short controlID ; resource ID of desired control (type 'CNTL')
WindowPtr theWindow ; window in which control should reside returns handle leading to a ControlRecord (or NIL if error)
GetNewControl locates a 'CNTL' resource from among open resource files, allocates memory for and initializes a ControlRecord from that template, and returns a handle leading to the record. The control is inserted into the front of
the window's control list. If visible, the control is drawn immediately.
controlID is the resource ID of a type 'CNTL' control template resource which
is also the ID of a 'cctb' color table resource if it exists.
theWindow is a pointer to a 108-byte GrafPort structure (actually a 156-byte WindowRecord). It identifies the window in which the control should reside.
structure. A return value of NIL indicates failure to locate a type
'CNTL' resource having ID= controlID.
all the parameters are defined in a resource rather than embedded into the
applications.
screen and free up memory it uses.
If a 'cctb' resource of the same ID of the 'CNTL' resource is found, it will
become the control's color table.